Don't allow transient maps when prefix length is zero.
authorJustin Burkett <justin@burkett.cc>
Mon, 14 Feb 2022 03:33:02 +0000 (22:33 -0500)
committerJustin Burkett <justin@burkett.cc>
Mon, 14 Feb 2022 03:33:02 +0000 (22:33 -0500)
Fixes #335

which-key.el

index c13f4af25aa5be189b268eeeba0745bcd96cec28..d2743198fa104edc60c145dd071cd9180ae994e3 100644 (file)
@@ -2655,6 +2655,9 @@ Finally, show the buffer."
                         (not which-key--secondary-timer-active))
                (which-key--start-timer which-key-idle-secondary-delay t))))
           ((and which-key-show-transient-maps
+                ;; Assuming that if this is not true we're in
+                ;; `which-key-show-top-level', which would then be overwritten.
+                (> (length prefix-keys) 0)
                 (keymapp overriding-terminal-local-map)
                 ;; basic test for it being a hydra
                 (not (eq (lookup-key overriding-terminal-local-map "\C-u")